#include <stdio.h>
int stat(int **p,int i,int *tcount);
int main()
{    
	int data[4][4];    
	int m[4];    
	int s[4];    
	int i,j;    
	int *p[4];    
	int count;    
	for (i=0;i<4;i++)    
	for (j=0;j<4;j++)    
	{        
		scanf("%d", &data[i][j]);    
	}    
	for (i=0;i<4;i++)    
	{        
		p[i] = data[i];    
	}    
	for (i=0;i<4;i++)    
	{        
		int d = stat(p,i,&count);        
		printf("line%d = %d; sum = %d\n", i+1, count, d);    
	}    
	return 0;
}
int stat(int **p,int i,int *tcount)
{    
	int sum=0,j=0;    
	int n=4;    
	int num=0;    
	while (n--)    
	{        
		if (p[i][j]%2==0)        
		{            
			num++;            
			sum+=p[i][j];        
		}        
		*tcount = num;        
		j++;    
	}    
	return sum;
 }
